+2006-11-16 Michael Natterer <mitch@imendio.com>
+
+ * gtk/gtkradiobutton.c (gtk_radio_button_focus): don't use
+ gtk_widget_keynav_failed(). Instead, look at gtk-keynav-cursor-only
+ and gtk-keynav-wrap-around and wrap around, beep or continue outside
+ the group manually (bug #322640).
+
2006-11-16 Michael Natterer <mitch@imendio.com>
Add new infrastructure for notifications of failed keyboard
if (gtk_widget_is_focus (widget))
{
+ GtkSettings *settings = gtk_widget_get_settings (widget);
GSList *focus_list, *tmp_list;
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
GtkWidget *new_focus = NULL;
+ gboolean cursor_only;
+ gboolean wrap_around;
switch (direction)
{
}
}
+ g_object_get (settings,
+ "gtk-keynav-cursor-only", &cursor_only,
+ "gtk-keynav-wrap-around", &wrap_around,
+ NULL);
+
if (!new_focus)
{
- if (!gtk_widget_keynav_failed (widget, direction))
+ if (cursor_only)
{
g_slist_free (focus_list);
return FALSE;
}
+ if (!wrap_around)
+ {
+ g_slist_free (focus_list);
+ gtk_widget_error_bell (widget);
+ return TRUE;
+ }
+
tmp_list = focus_list;
while (tmp_list)
if (new_focus)
{
- GtkSettings *settings = gtk_widget_get_settings (widget);
- gboolean cursor_only;
-
- g_object_get (settings,
- "gtk-keynav-cursor-only", &cursor_only,
- NULL);
-
gtk_widget_grab_focus (new_focus);
if (!cursor_only)